from django.db import models
# 这里导入也是没有问题
# from apps.utils.models import BaseModel
# from luffyapi.apps.utils.models import BaseModel
from utils.models import BaseModel


class Banner(BaseModel):
    # 图片名必须唯一
    name = models.CharField(max_length=32, verbose_name='图片名称', unique=True)
    image = models.ImageField(upload_to='banner', verbose_name='轮播图', help_text='图片尺寸必须是：3840*800', null=True)
    link = models.CharField(max_length=64, verbose_name='图片链接')
    info = models.TextField(verbose_name='图片简介')

    def __str__(self):
        return self.name
